﻿using System;
using ModuloSoporte;

namespace IU.Admin
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user_server"] != null)
            {
                Response.Redirect("Admin.aspx");
            }
        }

        public void ButtonLogin_Click(object sender, EventArgs e)
        {
            if (AdministradoraUsuarios.AccederServidor(
                TextBoxUser.Text, TextBoxPass.Text))
            {
                Response.Redirect("Admin.aspx");
            }
            else
            {
                Response.Write("Error");
            }
        }

        public void ButtonCancel_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Default.aspx");
        }
    }
}
